package com.smart.campus.controller;

import com.smart.campus.dto.AttendanceTime;
import com.smart.campus.interfaces.AttendanceTimeServiceApi;
import com.smart.campus.service.AttendanceTimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class AttendanceTimeController implements AttendanceTimeServiceApi {
    @Autowired
    private AttendanceTimeService attendanceTimeService;

    @Override
    public List<AttendanceTime> findList() {
        return attendanceTimeService.findList();
    }

    @Override
    public void addAtt(AttendanceTime attendanceTime) {
        attendanceTimeService.addAtt(attendanceTime);
    }

    @Override
    public void delAtt(Integer id) {
        attendanceTimeService.delAtt(id);
    }

    @Override
    public AttendanceTime findAttById(Integer id) {
        return attendanceTimeService.findAttById(id);
    }

    @Override
    public void update(AttendanceTime attendanceTime) {
        attendanceTimeService.update(attendanceTime);
    }
}
